package cn.org.utils;

import java.util.Comparator;

import cn.org.domain.Org;

public class ComparatorOrg implements Comparator{

	@Override
	public int compare(Object o1, Object o2) {
		Org org1=(Org) o1;
		Org org2=(Org) o2;
		 int flag=org1.getLevel().compareTo(org2.getLevel());
		  if(flag==0){
		   return org1.getSn().compareTo(org2.getSn());
		  }else{
		   return flag;
		  }  
	}

}
